package cn.psh.pet.domain;

import java.math.BigDecimal;
import java.util.Date;
import cn.psh.basic.domain.BaseDomain;
import cn.psh.org.domain.Shop;
import cn.psh.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author pider
 * @since 2022-09-23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Pet extends BaseDomain{

    private static final long serialVersionUID = 1L;

    private String name;
    private BigDecimal costprice;
    private BigDecimal saleprice;
    /**
     * 类型id
     */
    private Long typeId;
    private String resources;
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    private Date offsaletime;
    /**
     * 状态：0下架 1上架
     */
    private Long state=0l;


    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    private Date createtime = new Date();
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shopId;
    /**
     * 如果被领养为领养用户id
     */
    private Long userId;
    private Long searchMasterMsgId;

//  宠物类型
    private PetType petType;
//    店铺
    private Shop shop;
//    用户
    private User user;
//    宠物详情
    private PetDetail petDetail;

}
